//
// Created by wze-zero on 2024/7/7 007.
//

#include <iostream>

using namespace std;

int main() {
    float num;
    cin >> num;
    int n = (int) num;
    float m = num - (float) n;
    if (num > 0) {
        if (m < 0.5) {
            cout << n << endl;
        } else {
            cout << n + 1 << endl;
        }
    } else {
        if (m < -0.5) {
            cout << n - 1 << endl;
        } else {
            cout << n << endl;
        }
    }
    return 0;
}
